package com.loong.system.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.loong.framework.annotation.TransferDict;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Author: ten.x @TableName sys_tenant @Date: 2024-04-01 22:45:44 @Version: V1.0
 */
@Data
@Accessors(chain = true)
@TableName(value = "sys_tenant")
@EqualsAndHashCode(callSuper = false)
public class TenantListVO implements Serializable {

  @Serial
  @TableField(exist = false)
  private static final long serialVersionUID = 1L;

  /** 主键：租户ID */
  @TableId(value = "id")
  @Schema(description = "租户ID")
  private String id;

  /** 租户姓名 */
  @Size(max = 100, message = "编码长度不能超过100")
  @TableField(value = "name")
  @Schema(description = "租户姓名")
  @Length(max = 100, message = "编码长度不能超过100")
  private String name;

  /** 联系电话 */
  @Size(max = 20, message = "编码长度不能超过20")
  @TableField(value = "contact_number")
  @Schema(description = "联系电话")
  @Length(max = 20, message = "编码长度不能超过20")
  private String contactNumber;

  /** 电子邮箱 */
  @Size(max = 100, message = "编码长度不能超过100")
  @TableField(value = "email")
  @Schema(description = "电子邮箱")
  @Length(max = 100, message = "编码长度不能超过100")
  private String email;

  /** 地址 */
  @Size(max = 255, message = "编码长度不能超过255")
  @TableField(value = "address")
  @Schema(description = "地址")
  @Length(max = 255, message = "编码长度不能超过255")
  private String address;

  /** 租赁开始日期 */
  @TableField(value = "lease_start_date")
  @Schema(description = "租赁开始日期")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private LocalDate leaseStartDate;

  /** 租赁结束日期 */
  @TableField(value = "lease_end_date")
  @Schema(description = "租赁结束日期")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private LocalDate leaseEndDate;

  /** 押金金额 */
  @TableField(value = "deposit_amount")
  @Schema(description = "押金金额")
  private BigDecimal depositAmount;

  /** 押金状态 */
  @Size(max = 20, message = "编码长度不能超过20")
  @TableField(value = "deposit_status")
  @Schema(description = "押金状态")
  @Length(max = 20, message = "编码长度不能超过20")
  private String depositStatus;

  @Schema(description = "押金状态描述")
  @TransferDict(type = "deposit_status", field = "deposit_status")
  private String depositStatusDesc;

  /** 租金金额 */
  @TableField(value = "rent_amount")
  @Schema(description = "租金金额")
  private BigDecimal rentAmount;

  /** 租金支付周期 */
  @TableField(value = "rent_payment_period")
  @Schema(description = "租金支付周期")
  private Integer rentPaymentPeriod;

  /** 租户身份证号码 */
  @Size(max = 20, message = "编码长度不能超过20")
  @TableField(value = "id_number")
  @Schema(description = "租户身份证号码")
  @Length(max = 20, message = "编码长度不能超过20")
  private String idNumber;

  /** 紧急联系人 */
  @Size(max = 100, message = "编码长度不能超过100")
  @TableField(value = "emergency_contact")
  @Schema(description = "紧急联系人")
  @Length(max = 100, message = "编码长度不能超过100")
  private String emergencyContact;

  /** 租户类型 */
  @Size(max = 50, message = "编码长度不能超过50")
  @TableField(value = "tenant_type")
  @Schema(description = "租户类型")
  @Length(max = 50, message = "编码长度不能超过50")
  private String tenantType;

  @Schema(description = "租户类型描述")
  @TransferDict(type = "tenant_type", field = "tenant_type")
  private String tenantTypeDesc;

  /** 公司名称 */
  @Size(max = 100, message = "编码长度不能超过100")
  @TableField(value = "company_name")
  @Schema(description = "公司名称")
  @Length(max = 100, message = "编码长度不能超过100")
  private String companyName;

  /** 营业执照号码 */
  @Size(max = 50, message = "编码长度不能超过50")
  @TableField(value = "business_license_number")
  @Schema(description = "营业执照号码")
  @Length(max = 50, message = "编码长度不能超过50")
  private String businessLicenseNumber;

  /** 营业执照照片 */
  @Schema(description = "营业执照照片")
  private String businessLicensePic;

  /** 法定代表人 */
  @Size(max = 100, message = "编码长度不能超过100")
  @TableField(value = "legal_representative")
  @Schema(description = "法定代表人")
  @Length(max = 100, message = "编码长度不能超过100")
  private String legalRepresentative;

  /** 创建时间 */
  @TableField(value = "gmt_create")
  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime gmtCreate;

  /** 修改时间 */
  @TableField(value = "gmt_modified")
  @Schema(description = "修改时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime gmtModified;
}
